const express = require('express');
const multer = require('multer')
const upload = multer({ dest: 'public/avataruploads/' })

const userRouter = express.Router();
const UserController = require('../../controllers/admin/UserController')

userRouter.post('/adminapi/user/login', UserController.login)

userRouter.post('/adminapi/user/upload', upload.single('file'), UserController.upload)

userRouter.post('/adminapi/user/add', upload.single('file'), UserController.userAdd)

userRouter.get('/adminapi/use/list', UserController.getList)

userRouter.delete('/adminapi/user/list/:id', UserController.userDelete)

userRouter.post('/adminapi/user/edit', upload.single('file'), UserController.userEdit)

module.exports = userRouter;
